package com.web.jdbcyw1.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.web.jdbcbase.dao.MenuDao;
import com.web.jdbcyw1.dao.UserDao;
import com.web.jdbcyw1.module.User;
import com.web.jdbcyw1.service.UserService;
@Service("userService1")
public class UserServiceImpl1 implements UserService {
	@Resource
	private UserDao userDao;
	@Override
	public List<User> queryUser(User user) {
		return this.userDao.queryUser(user);
	}
	@Override
	public User queryUserForOne(String str) {
		return this.userDao.queryUserForOne(str);
	}
	@Override
	@Transactional("transactionManager")
	public int addUser(User user) {
		int flag = this.userDao.addUser(user);
		System.out.println(1/0);
		return flag;
	}

}
